import config from "@/config"
import http from "@/utils/request"

export default {
  delUser: {
    url: `${config.API_URL}/web/common/del`,
    name: "删除用户",
    get: async function(params){
      return await http.get(this.url, params)
    }
  },
  getUser: {
    url: `${config.API_URL}/cms/user/pageList`,
    name: "获取用户表",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  userDetail: {
    url: `${config.API_URL}/cms/user/getByUserId/`,
    name: "获取用户详情",
    get: async function(params){
      return await http.get(this.url+params)
    }
  },
  getProfession: {
    url: `${config.API_URL}/cms/user/profession/list`,
    name: "获取行业数据",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  searchUser: {
    url: `${config.API_URL}/cms/common/creator/search`,
    name: "搜索用户列表",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  userUpload: {
    url: `${config.API_URL}/cms/user/save/`,
    name: "上传编辑用户信息",
    post: async function(data){
      return await http.post(this.url+data.userId,data)
    }
  },
  uploadFile: {
    url: `${config.API_URL}/admin/file/upload`,
    name: "上传文件",
    post: async function(data){
      return await http.post(this.url,data)
    }
  },
}